import { PORT2 } from '../config/servicePort';
import http from '@/api';
import { File } from '../interface/file';

// 上传文件
export const fileUpload = () => {
  return http.post(PORT2 + `/file/upload`);
};

// 查询表单附件列表
export const fileByForm = (params: File.ReqFileByForm) => {
  return http.post(PORT2 + `/file/byForm`, params);
};

// 下载附件
export const fileDown = (params: File.ReqFileDown) => {
  return http.download(PORT2 + `/file/down`, params);
};

// 删除附件
export const fileRemove = (params: File.ReqFileByForm) => {
  return http.post(PORT2 + `/file/remove`, params);
};
